package com.ityueqiangu.system.controller;

import com.ityueqiangu.system.domain.SysUser;
import com.ityueqiangu.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
@RequestMapping(value = "/sys/im")
public class SysIMController {
    /**
     * 访问路径前缀
     * */
    private final String PATH_PREFIX = "project/im/";


    @Autowired
    private ISysUserService sysUserService;
    /**
     * 访问主页
     * @return
     */
    @GetMapping("/dialog")
    public ModelAndView index(){
        ModelAndView view = new ModelAndView(PATH_PREFIX+"dialog");
        SysUser sysUser =new SysUser();
        sysUser.setIsDeleted("0");
        sysUser.setRoleId(4);
        List<SysUser> list = sysUserService.selectSysUserList(sysUser);
        view.addObject("robotList",list);
        return view;
    }
}
